package com.yunhuajinfu.response;

import com.yunhuajinfu.entity.BankList;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.ArrayList;

public class BankCardRes {
	
    private ArrayList<BankList> bankList;
    
    
	public BankCardRes () {
		
	}	
        
    public BankCardRes (JSONObject json) {
    

        this.bankList = new ArrayList<BankList>();
        JSONArray arrayBankList = json.optJSONArray("bankList");
        if (null != arrayBankList) {
            int bankListLength = arrayBankList.length();
            for (int i = 0; i < bankListLength; i++) {
                JSONObject item = arrayBankList.optJSONObject(i);
                if (null != item) {
                    this.bankList.add(new BankList(item));
                }
            }
        }
        else {
            JSONObject item = json.optJSONObject("bankList");
            if (null != item) {
                this.bankList.add(new BankList(item));
            }
        }


    }
    
    public ArrayList<BankList> getBankList() {
        return this.bankList;
    }

    public void setBankList(ArrayList<BankList> bankList) {
        this.bankList = bankList;
    }


    
}
